Spread ASP.NET 6.0 Product Documentation
ListBoxCellType Constructor(String[])
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > ListBoxCellType Class > ListBoxCellType Constructor : ListBoxCellType Constructor(String[])


items
Items for the list specified in a string array

Glossary Item Box

Creates a new list box cell with the specified list items.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal items() As String _
)
Visual Basic (Usage)Copy Code
Dim items() As String
 
Dim instance As New ListBoxCellType(items)
C# 
public ListBoxCellType( 
   string[] items
)

Parameters

items
Items for the list specified in a string array

Example

This example creates a list box cell type, sets up an array of items for the list, sets the background and foreground color for the selected item and assigns the object to the first cell in the sheet.
C#Copy Code
    FarPoint.Web.Spread.ListBoxCellType lbcell = new FarPoint.Web.Spread.ListBoxCellType(new String[] {"Carbon", "Oxygen",
"Hydrogen"});
    lbcell.SelectedBackColor = Color.Yellow;
    lbcell.SelectedForeColor = Color.DarkBlue;
    FpSpread1.ActiveSheetView.Cells[0, 0].CellType = lbcell;
    FpSpread1.ActiveSheetView.Rows[0].Height = 140;
Visual BasicCopy Code
    Dim lbcell As New FarPoint.Web.Spread.ListBoxCellType(New String() {"Carbon", "Oxygen", "Hydrogen"})
    lbcell.SelectedBackColor = Color.Yellow
    lbcell.SelectedForeColor = Color.DarkBlue
    FpSpread1.ActiveSheetView.Cells(0, 0).CellType = lbcell
    FpSpread1.ActiveSheetView.Rows(0).Height = 140

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.